package com.xinqi.modules.file.course.clazz.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xinqi.common.base.enums.YesNoNumberEnum;
import com.xinqi.common.mybatis.data.service.impl.BaseServiceImpl;
import com.xinqi.modules.file.course.clazz.domain.ClassStudentEntity;
import com.xinqi.modules.file.course.clazz.mapper.ClassStudentMapper;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassStudentService extends BaseServiceImpl<ClassStudentMapper, ClassStudentEntity> {

    public List<ClassStudentEntity> findListByClassId(Long classId) {
        LambdaQueryWrapper<ClassStudentEntity> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(ClassStudentEntity::getClassId, classId).eq(ClassStudentEntity::getIsTeacher, YesNoNumberEnum.NO.getCode());
        return list(wrapper);
    }

}
